<!--正福易考通-->
<style type="text/less">
    @import "/web/public/public.less";
    #ykt_course1.course{
        margin-top: 40px;
        .title{
            border-bottom: 1px solid #eeeeee;
            .title_txt{
                font-size: 20px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 2px;
                color: #333333;
                border-left: 5px solid #5d5d5d;
                margin-bottom: 20px;
                padding-left: 10px;
                display:inline-block;
            }
            .more{
                float: right;
                font-size: 14px;
                font-weight: normal;
                font-stretch: normal;
                letter-spacing: 0px;
                color: #7f7f7f;
            }
        }
        .ykt_list{
            width: 100%;
            margin-top: 5px;
            li{
                margin: 15px 3px;
                width: 220px;
                display: inline-block;
                float: left;
                position: relative;
                .link_img{
                    width: 100%;
                    height: 135px;
                    display: inline-block;
                    img{
                        width: 100%;
                        height: auto;
                    }
                }
                a{
                    font-size: 14px;
                    font-weight: normal;
                    font-stretch: normal;
                    line-height: 22px;
                    letter-spacing: 0px;
                    color: #333333;
                    margin-top: 4px;
                    height: 44px;
                    display: inline-block;
                    .ellipsis-mult(2);
                    &:hover{
                        color: #e70115;
                    }
                }
                &:hover{
                    top: -4px;
                }
            }

        }
    }
</style>
<#if channel.channelStatus == 1>
    <div id="ykt_course1" class="course" data-num="${channel.channelCount * 3}">
        <div class="title">
            <h2 class="title_txt"><a href="${channel.channelHomeUrl}" target="_blank">${channel.channelName}</a></h2>
            <a class="more" href="${channel.channelHomeUrl}" target="_blank">更多></a>
        </div>
        <ul class="ykt_list"></ul>
    </div>
</#if>
<script>
    function listCourse() {
        var data = {
            pageNum: 1,
            pageSize: $('#ykt_course1').data('num'),
            isOnline: '',
            source: 4,
            yxbName: ''
        }
        // console.log(data);
        $.ajax({
            url: 'https://ykt.caigou2003.com/ykt_java//home/listCourse',
            data: data,
            type: 'get',
            success: function (res) {
                // console.log(res);
                var resData = res.resData.list;
                // console.log(resData);
                var html = '';
                resData.forEach(function (item, i) {
                    // console.log(item)
                    html += '<li>' +
                        '<a class="link_img" target="_blank" href="https://ykt.caigou2003.com/#/sign_detail?courseId='+ item.courseId +'&tabId=0"><img src="'+ item.imgUrl +'" alt=""></a>' +
                        '<h3><a target="_blank" href="https://ykt.caigou2003.com/#/sign_detail?courseId='+ item.courseId +'&tabId=0">'+ item.courseName +'</a></h3>' +
                        '</li>'
                });
                $('.ykt_list').html(html);
            }
        })
    }
    listCourse();

</script>